package com.situ.day9;

import java.util.ArrayList;

import org.junit.Test;

public class BaoZhuangLeiXing {

	@Test
	public void test1() {
		ArrayList<Integer> list = new ArrayList<Integer>();
		list.add(6);
		list.add(666);
		for (Integer integer : list) {
			System.out.println(integer);
		}
		
		System.out.println(Integer.MAX_VALUE);
		System.out.println(Integer.MIN_VALUE);
		
		// 自动拆箱和装箱
		Integer integer1 = new Integer(9);
		Integer integer2 = 4;
		System.out.println(integer1);
		System.out.println(integer2);
		Integer integer3 = 10;
		System.out.println("integer3 : " + integer3);
		integer3 = integer3 + 5;
		System.out.println("integer3 : " + integer3);
	}
	
	@Test
	public void test2() {
		String str = "30";
		int value1 = Integer.parseInt(str);
		System.out.println(value1 + 10);
		
		Integer integer = new Integer(str);
		int value2 = integer.intValue();
		System.out.println(value2 + 20);
		
		String str2 = "3.14";
		double d = Double.parseDouble(str2);
		System.out.println(d);
	
		String str3 = "true";
		boolean bool = Boolean.parseBoolean(str3);
		System.out.println(bool);
	}
}
